<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: postprocess.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v3.0 (July 2012)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_05450b5d2ab8e47c80b981c3855591de.html">include</a></li><li class="navelem"><a class="el" href="dir_a0054a07d891188db28151015716f171.html">assimp</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="postprocess_8h.html#define-members">Macros</a> &#124;
<a href="postprocess_8h.html#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">postprocess.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Definitions for import post processing steps.  
<a href="postprocess_8h.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:acd2361a766665ce2dbfb3eae201b784d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="postprocess_8h.html#acd2361a766665ce2dbfb3eae201b784d">aiProcess_ConvertToLeftHanded</a></td></tr>
<tr class="memdesc:acd2361a766665ce2dbfb3eae201b784d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut flag for Direct3D-based applications.  <a href="postprocess_8h.html#acd2361a766665ce2dbfb3eae201b784d"></a><br/></td></tr>
<tr class="memitem:ac72dfcb11eae3f0403430b2d9bd6aaac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="postprocess_8h.html#ac72dfcb11eae3f0403430b2d9bd6aaac">aiProcessPreset_TargetRealtime_Fast</a></td></tr>
<tr class="memitem:aaa612ed3f167a8999405d53fc309594b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="postprocess_8h.html#aaa612ed3f167a8999405d53fc309594b">aiProcessPreset_TargetRealtime_MaxQuality</a></td></tr>
<tr class="memdesc:aaa612ed3f167a8999405d53fc309594b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default postprocess configuration optimizing the data for real-time rendering.  <a href="postprocess_8h.html#aaa612ed3f167a8999405d53fc309594b"></a><br/></td></tr>
<tr class="memitem:a450d38c62891ec72077a011098ee4412"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="postprocess_8h.html#a450d38c62891ec72077a011098ee4412">aiProcessPreset_TargetRealtime_Quality</a></td></tr>
<tr class="memdesc:a450d38c62891ec72077a011098ee4412"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default postprocess configuration optimizing the data for real-time rendering.  <a href="postprocess_8h.html#a450d38c62891ec72077a011098ee4412"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a64795260b95f5a4b3f3dc1be4f52e410"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410">aiPostProcessSteps</a> { <br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a8857a0e30688127a82c7b8939958c6dc">aiProcess_CalcTangentSpace</a> =  0x1, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a444a6c9d8b63e6dc9e1e2e1edd3cbcd4">aiProcess_JoinIdenticalVertices</a> =  0x2, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a133fd1162674e68bf8cd17070898a936">aiProcess_MakeLeftHanded</a> =  0x4, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a9c3de834f0307f31fa2b1b6d05dd592b">aiProcess_Triangulate</a> =  0x8, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a0ab270168bd7a707c0f279045c265e08">aiProcess_RemoveComponent</a> =  0x10, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a4e0d60129724464915ebc5533a9bba78">aiProcess_GenNormals</a> =  0x20, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a6afb4fee42eca4482674859196cb8685">aiProcess_GenSmoothNormals</a> =  0x40, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a7bb8f16468032a3ba9a23fa37df82174">aiProcess_SplitLargeMeshes</a> =  0x80, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a6e50fab95214a33996e28fae3efc7582">aiProcess_PreTransformVertices</a> =  0x100, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a9fc450a103aa2831c145c49bc56c9439">aiProcess_LimitBoneWeights</a> =  0x200, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ae420ce22fbbac9d0fd21fd92f2b630fa">aiProcess_ValidateDataStructure</a> =  0x400, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a16979c68f93d283c6886abf580d557b1">aiProcess_ImproveCacheLocality</a> =  0x800, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a052d2921c33cd21141480b8f25524bb1">aiProcess_RemoveRedundantMaterials</a> =  0x1000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a620b08f185e87a67a3efd9295eed6e82">aiProcess_FixInfacingNormals</a> =  0x2000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ab4484f73635d633cd79973bac1431ed6">aiProcess_SortByPType</a> =  0x8000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ae1311236ea7a55b7355c5aa535586ad0">aiProcess_FindDegenerates</a> =  0x10000, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a42a93fc16a7a3b6df509bab503945421">aiProcess_FindInvalidData</a> =  0x20000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410aa4ae05f45c5682ab245cf8e87986426f">aiProcess_GenUVCoords</a> =  0x40000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a87577c60885b193571a10237341b237f">aiProcess_TransformUVCoords</a> =  0x80000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a4982e6ac69991617b1481bce00d1fc0e">aiProcess_FindInstances</a> =  0x100000, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410af5fe0d6ee720c91359dc61cb849f2ebf">aiProcess_OptimizeMeshes</a> =  0x200000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a3bf6b8cb30289fd27fb2734d67a0889f">aiProcess_OptimizeGraph</a> =  0x400000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a06922b6a1f1cd8186f9fdafb471c813e">aiProcess_FlipUVs</a> =  0x800000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a429a11bf7ace46f039f55de895505d4a">aiProcess_FlipWindingOrder</a> =  0x1000000, 
<br/>
&#160;&#160;<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ac662c1d8f4e37cdf2a54023b174da192">aiProcess_SplitByBoneCount</a> =  0x2000000, 
<a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a8e14bca58301e2ee29cf928156c3a9f9">aiProcess_Debone</a> =  0x4000000
<br/>
 }</td></tr>
<tr class="memdesc:a64795260b95f5a4b3f3dc1be4f52e410"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the flags for all possible post processing steps.  <a href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410">More...</a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Definitions for import post processing steps. </p>
</div><hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="acd2361a766665ce2dbfb3eae201b784d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define aiProcess_ConvertToLeftHanded</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">( \</div>
<div class="line">        aiProcess_MakeLeftHanded     | \</div>
<div class="line">        aiProcess_FlipUVs            | \</div>
<div class="line">        aiProcess_FlipWindingOrder   | \</div>
<div class="line">        0 )</div>
</div><!-- fragment -->
<p>Shortcut flag for Direct3D-based applications. </p>
<p>Supersedes the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a133fd1162674e68bf8cd17070898a936">aiProcess_MakeLeftHanded</a> and <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a06922b6a1f1cd8186f9fdafb471c813e">aiProcess_FlipUVs</a> and <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a429a11bf7ace46f039f55de895505d4a">aiProcess_FlipWindingOrder</a> flags. The output data matches Direct3D's conventions: left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="ac72dfcb11eae3f0403430b2d9bd6aaac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define aiProcessPreset_TargetRealtime_Fast</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">( \</div>
<div class="line">        aiProcess_CalcTangentSpace              |  \</div>
<div class="line">        aiProcess_GenNormals                    |  \</div>
<div class="line">        aiProcess_JoinIdenticalVertices |  \</div>
<div class="line">        aiProcess_Triangulate                   |  \</div>
<div class="line">        aiProcess_GenUVCoords           |  \</div>
<div class="line">        aiProcess_SortByPType           |  \</div>
<div class="line">        0 )</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aaa612ed3f167a8999405d53fc309594b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define aiProcessPreset_TargetRealtime_MaxQuality</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">( \</div>
<div class="line">        aiProcessPreset_TargetRealtime_Quality   |  \</div>
<div class="line">        aiProcess_FindInstances                  |  \</div>
<div class="line">        aiProcess_ValidateDataStructure          |  \</div>
<div class="line">        aiProcess_OptimizeMeshes                 |  \</div>
<div class="line">        aiProcess_Debone                                                 |  \</div>
<div class="line">        0 )</div>
</div><!-- fragment -->
<p>Default postprocess configuration optimizing the data for real-time rendering. </p>
<p>This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.</p>
<p>If you're using DirectX, don't forget to combine this value with the <a class="el" href="postprocess_8h.html#acd2361a766665ce2dbfb3eae201b784d" title="Shortcut flag for Direct3D-based applications.">aiProcess_ConvertToLeftHanded</a> step. If you don't support UV transformations in your application, apply the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a87577c60885b193571a10237341b237f">aiProcess_TransformUVCoords</a> step, too. </p>
<dl class="section note"><dt>Note:</dt><dd>Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them. </dd></dl>

</div>
</div>
<a class="anchor" id="a450d38c62891ec72077a011098ee4412"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define aiProcessPreset_TargetRealtime_Quality</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">( \</div>
<div class="line">        aiProcess_CalcTangentSpace                              |  \</div>
<div class="line">        aiProcess_GenSmoothNormals                              |  \</div>
<div class="line">        aiProcess_JoinIdenticalVertices                 |  \</div>
<div class="line">        aiProcess_ImproveCacheLocality                  |  \</div>
<div class="line">        aiProcess_LimitBoneWeights                              |  \</div>
<div class="line">        aiProcess_RemoveRedundantMaterials      |  \</div>
<div class="line">        aiProcess_SplitLargeMeshes                              |  \</div>
<div class="line">        aiProcess_Triangulate                                   |  \</div>
<div class="line">        aiProcess_GenUVCoords                   |  \</div>
<div class="line">        aiProcess_SortByPType                   |  \</div>
<div class="line">        aiProcess_FindDegenerates               |  \</div>
<div class="line">        aiProcess_FindInvalidData               |  \</div>
<div class="line">        0 )</div>
</div><!-- fragment -->
<p>Default postprocess configuration optimizing the data for real-time rendering. </p>
<p>Unlike <a class="el" href="postprocess_8h.html#ac72dfcb11eae3f0403430b2d9bd6aaac">aiProcessPreset_TargetRealtime_Fast</a>, this configuration performs some extra optimizations to improve rendering speed and to minimize memory usage. It could be a good choice for a level editor environment where import speed is not so important.</p>
<p>If you're using DirectX, don't forget to combine this value with the <a class="el" href="postprocess_8h.html#acd2361a766665ce2dbfb3eae201b784d" title="Shortcut flag for Direct3D-based applications.">aiProcess_ConvertToLeftHanded</a> step. If you don't support UV transformations in your application apply the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a87577c60885b193571a10237341b237f">aiProcess_TransformUVCoords</a> step, too. </p>
<dl class="section note"><dt>Note:</dt><dd>Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them. </dd></dl>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410">aiPostProcessSteps</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the flags for all possible post processing steps. </p>
<dl class="section see"><dt>See also:</dt><dd>Importer::ReadFile </dd>
<dd>
<a class="el" href="cimport_8h.html#a09fe8ba0c8e91bf04b4c29556be53b6d" title="Reads the given file and returns its content.">aiImportFile</a> </dd>
<dd>
<a class="el" href="cimport_8h.html#ae2b9815cac53dfcb2bf09aa9d8649894" title="Reads the given file using user-defined I/O functions and returns its content.">aiImportFileEx</a> </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a8857a0e30688127a82c7b8939958c6dc"></a>aiProcess_CalcTangentSpace</em>&nbsp;</td><td>
<hr/>
Calculates the tangents and bitangents for the imported meshes. </p>
<pre class="fragment">       Does nothing if a mesh does not have normals. You might want this post 
       processing step to be executed if you plan to use tangent space calculations 
       such as normal mapping  applied to the meshes. There's a config setting,
       &lt;tt&gt;#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE&lt;/tt&gt;, which allows you to specify
       a maximum smoothing angle for the algorithm. However, usually you'll
       want to leave it at the default value.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a444a6c9d8b63e6dc9e1e2e1edd3cbcd4"></a>aiProcess_JoinIdenticalVertices</em>&nbsp;</td><td>
<hr/>
Identifies and joins identical vertex data sets within all imported meshes.</p>
<p>After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. <b>If this flag is not specified</b>, no vertices are referenced by more than one face and <b>no index buffer is required</b> for rendering. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a133fd1162674e68bf8cd17070898a936"></a>aiProcess_MakeLeftHanded</em>&nbsp;</td><td>
<hr/>
Converts all the imported data to a left-handed coordinate space. </p>
<pre class="fragment">       By default the data is returned in a right-handed coordinate space (which 
       OpenGL prefers). In this space, +X points to the right, 
       +Z points towards the viewer, and +Y points upwards. In the DirectX 
   coordinate space +X points to the right, +Y points upwards, and +Z points 
   away from the viewer.

       You'll probably want to consider this flag if you use Direct3D for
       rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
       setting and bundles all conversions typically required for D3D-based
       applications.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a9c3de834f0307f31fa2b1b6d05dd592b"></a>aiProcess_Triangulate</em>&nbsp;</td><td>
<hr/>
Triangulates all faces of all meshes. </p>
<pre class="fragment">       By default the imported mesh data might contain faces with more than 3
       indices. For rendering you'll usually want all faces to be triangles. 
       This post processing step splits up faces with more than 3 indices into 
       triangles. Line and point primitives are *not* modified! If you want
       'triangles only' with no other kinds of primitives, try the following
       solution:
       &lt;ul&gt;
       &lt;li&gt;Specify both #aiProcess_Triangulate and #aiProcess_SortByPType &lt;/li&gt;
       &lt;/li&gt;Ignore all point and line meshes when you process assimp's output&lt;/li&gt;
       &lt;/ul&gt;</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a0ab270168bd7a707c0f279045c265e08"></a>aiProcess_RemoveComponent</em>&nbsp;</td><td>
<hr/>
Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).</p>
<p>The components to be removed are specified in a separate configuration option, <code><a class="el" href="config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637" title="Input parameter to the aiProcess_RemoveComponent step: Specifies the parts of the data structure to b...">AI_CONFIG_PP_RVC_FLAGS</a></code>. This is quite useful if you don't need all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By using this step you can make sure they are NOT there.</p>
<p>This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD app, and it has per-face vertex colors. Vertex positions can't be shared, thus the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a444a6c9d8b63e6dc9e1e2e1edd3cbcd4">aiProcess_JoinIdenticalVertices</a> step fails to optimize the data because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components are excluded as early as possible thus opening more room for internal optimizations. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a4e0d60129724464915ebc5533a9bba78"></a>aiProcess_GenNormals</em>&nbsp;</td><td>
<hr/>
Generates normals for all faces of all meshes. </p>
<pre class="fragment">       This is ignored if normals are already there at the time this flag 
       is evaluated. Model importers try to load them from the source file, so
       they're usually already there. Face normals are shared between all points
       of a single face, so a single point can have multiple normals, which
       forces the library to duplicate vertices in some cases.
       #aiProcess_JoinIdenticalVertices is *senseless* then.

       This flag may not be specified together with #aiProcess_GenSmoothNormals.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a6afb4fee42eca4482674859196cb8685"></a>aiProcess_GenSmoothNormals</em>&nbsp;</td><td>
<hr/>
Generates smooth normals for all vertices in the mesh. </p>
<pre class="fragment">      This is ignored if normals are already there at the time this flag 
      is evaluated. Model importers try to load them from the source file, so
      they're usually already there. 

      This flag may not be specified together with 
      #aiProcess_GenNormals. There's a configuration option, 
      &lt;tt&gt;#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE&lt;/tt&gt; which allows you to specify
      an angle maximum for the normal smoothing algorithm. Normals exceeding
      this limit are not smoothed, resulting in a 'hard' seam between two faces.
      Using a decent angle here (e.g. 80 degrees) results in very good visual
      appearance.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a7bb8f16468032a3ba9a23fa37df82174"></a>aiProcess_SplitLargeMeshes</em>&nbsp;</td><td>
<hr/>
Splits large meshes into smaller sub-meshes. </p>
<pre class="fragment">      This is quite useful for real-time rendering, where the number of triangles
      which can be maximally processed in a single draw-call is limited 
      by the video driver/hardware. The maximum vertex buffer is usually limited
      too. Both requirements can be met with this step: you may specify both a 
      triangle and vertex limit for a single mesh.

      The split limits can (and should!) be set through the 
      &lt;tt&gt;#AI_CONFIG_PP_SLM_VERTEX_LIMIT&lt;/tt&gt; and &lt;tt&gt;#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT&lt;/tt&gt; 
      settings. The default values are &lt;tt&gt;#AI_SLM_DEFAULT_MAX_VERTICES&lt;/tt&gt; and 
      &lt;tt&gt;#AI_SLM_DEFAULT_MAX_TRIANGLES&lt;/tt&gt;. 

      Note that splitting is generally a time-consuming task, but only if there's
      something to split. The use of this step is recommended for most users.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a6e50fab95214a33996e28fae3efc7582"></a>aiProcess_PreTransformVertices</em>&nbsp;</td><td>
<hr/>
Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.</p>
<p>The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step. This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare. </p>
<dl class="section note"><dt>Note:</dt><dd>The <code><a class="el" href="config_8h.html#ad1bf07f321c6f075e9c67f26b551b323" title="Configures the #aiProcess_PretransformVertices step to normalize all vertex components into the [-1...">AI_CONFIG_PP_PTV_NORMALIZE</a></code> configuration property can be set to normalize the scene's spatial dimension to the -1...1 range. </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a9fc450a103aa2831c145c49bc56c9439"></a>aiProcess_LimitBoneWeights</em>&nbsp;</td><td>
<hr/>
Limits the number of bones simultaneously affecting a single vertex to a maximum value.</p>
<p>If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as <code><a class="el" href="config_8h.html#ab0dbe36911bd9df0661bdb69ecadb2e1">AI_LMW_MAX_WEIGHTS</a></code> in <a class="el" href="config_8h.html" title="Defines constants for configurable properties for the library.">config.h</a>), but you can use the <code><a class="el" href="config_8h.html#a37c3ad7872523b615d42761f2dc1bdf5" title="Set the maximum number of bones affecting a single vertex.">AI_CONFIG_PP_LBW_MAX_WEIGHTS</a></code> setting to supply your own limit to the post processing step.</p>
<p>If you intend to perform the skinning in hardware, this post processing step might be of interest to you. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410ae420ce22fbbac9d0fd21fd92f2b630fa"></a>aiProcess_ValidateDataStructure</em>&nbsp;</td><td>
<hr/>
Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all material references are correct .. etc.</p>
<p>It is recommended that you capture <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a>'s log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find <em>all</em> inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures: </p>
<ul>
<li>
Error: There's something wrong with the imported data. Further postprocessing is not possible and the data is not usable at all. The import fails. #Importer::GetErrorString() or <a class="el" href="cimport_8h.html#abe72551b74cc4bc3c49349ce3014bc9b" title="Returns the error text of the last failed import process.">aiGetErrorString()</a> carry the error message around. </li>
<li>
Warning: There are some minor issues (e.g. 1000000 animation keyframes with the same time), but further postprocessing and use of the data structure is still safe. Warning details are written to the log file, <code>#AI_SCENE_FLAGS_VALIDATION_WARNING</code> is set in <a class="el" href="structai_scene.html#a4091f10bb81e05db00ebc34f40c48f38" title="Any combination of the AI_SCENE_FLAGS_XXX flags.">aiScene::mFlags</a> </li>
</ul>
<p>This post-processing step is not time-consuming. Its use is not compulsory, but recommended. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a16979c68f93d283c6886abf580d557b1"></a>aiProcess_ImproveCacheLocality</em>&nbsp;</td><td>
<hr/>
Reorders triangles for better vertex cache locality. </p>
<pre class="fragment">       The step tries to improve the ACMR (average post-transform vertex cache
       miss ratio) for all meshes. The implementation runs in O(n) and is 
       roughly based on the 'tipsify' algorithm (see &lt;a href="
       http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf"&gt;this
       paper&lt;/a&gt;).

       If you intend to render huge models in hardware, this step might
       be of interest to you. The &lt;tt&gt;#AI_CONFIG_PP_ICL_PTCACHE_SIZE&lt;/tt&gt;config
       setting can be used to fine-tune the cache optimization.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a052d2921c33cd21141480b8f25524bb1"></a>aiProcess_RemoveRedundantMaterials</em>&nbsp;</td><td>
<hr/>
Searches for redundant/unreferenced materials and removes them. </p>
<pre class="fragment">       This is especially useful in combination with the 
       #aiProcess_PretransformVertices and #aiProcess_OptimizeMeshes flags. 
       Both join small meshes with equal characteristics, but they can't do 
       their work if two meshes have different materials. Because several
       material settings are lost during Assimp's import filters,
       (and because many exporters don't check for redundant materials), huge
       models often have materials which are are defined several times with
       exactly the same settings.

       Several material settings not contributing to the final appearance of
       a surface are ignored in all comparisons (e.g. the material name).
       So, if you're passing additional information through the
       content pipeline (probably using *magic* material names), don't 
       specify this flag. Alternatively take a look at the
       &lt;tt&gt;#AI_CONFIG_PP_RRM_EXCLUDE_LIST&lt;/tt&gt; setting.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a620b08f185e87a67a3efd9295eed6e82"></a>aiProcess_FixInfacingNormals</em>&nbsp;</td><td>
<hr/>
This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.</p>
<p>The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410ab4484f73635d633cd79973bac1431ed6"></a>aiProcess_SortByPType</em>&nbsp;</td><td>
<hr/>
This step splits meshes with more than one primitive type in homogeneous sub-meshes.</p>
<p>The step is executed after the triangulation step. After the step returns, just one bit is set in <a class="el" href="structai_mesh.html#a99d66ac0a444068c1b252b30265cbf53" title="Bitwise combination of the members of the aiPrimitiveType enum.">aiMesh::mPrimitiveTypes</a>. This is especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use the <code><a class="el" href="config_8h.html#a971e337cb0d526861142586b8341cb98" title="Input parameter to the aiProcess_SortByPType step: Specifies which primitive types are removed by the...">AI_CONFIG_PP_SBP_REMOVE</a></code> option to specify which primitive types you need. This can be used to easily exclude lines and points, which are rarely used, from the import. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410ae1311236ea7a55b7355c5aa535586ad0"></a>aiProcess_FindDegenerates</em>&nbsp;</td><td>
<hr/>
This step searches all meshes for degenerate primitives and converts them to proper lines or points.</p>
<p>A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures: <br/>
<b>1.</b> (if you support lines and points for rendering but don't want the degenerates) </p>
<ul>
<li>
Specify the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ae1311236ea7a55b7355c5aa535586ad0">aiProcess_FindDegenerates</a> flag.  </li>
<li>
Set the <code>AI_CONFIG_PP_FD_REMOVE</code> option to 1. This will cause the step to remove degenerate triangles from the import as soon as they're detected. They won't pass any further pipeline steps.  </li>
</ul>
<p><br/>
<b>2.</b>(if you don't support lines and points at all) </p>
<ul>
<li>
Specify the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ae1311236ea7a55b7355c5aa535586ad0">aiProcess_FindDegenerates</a> flag.  </li>
<li>
Specify the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410ab4484f73635d633cd79973bac1431ed6">aiProcess_SortByPType</a> flag. This moves line and point primitives to separate meshes.  </li>
<li>
Set the <code>AI_CONFIG_PP_SBP_REMOVE</code> option to <div class="fragment"><div class="line"> aiPrimitiveType_POINTS | aiPrimitiveType_LINES</div>
</div><!-- fragment --> to cause SortByPType to reject point and line meshes from the scene.  </li>
</ul>
<dl class="section note"><dt>Note:</dt><dd>Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead. </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a42a93fc16a7a3b6df509bab503945421"></a>aiProcess_FindInvalidData</em>&nbsp;</td><td>
<hr/>
This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get rid of some common exporter errors.</p>
<p>This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by the <a class="el" href="postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410a6afb4fee42eca4482674859196cb8685">aiProcess_GenSmoothNormals</a> flag.<br/>
 The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key. The <code>AI_CONFIG_PP_FID_ANIM_ACCURACY</code> config property decides the accuracy of the check for duplicate animation tracks. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410aa4ae05f45c5682ab245cf8e87986426f"></a>aiProcess_GenUVCoords</em>&nbsp;</td><td>
<hr/>
This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.</p>
<p>Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.</p>
<dl class="section note"><dt>Note:</dt><dd>If this step is not requested, you'll need to process the <code><a class="el" href="material_8h.html#af72d0714d106aa52da2dbdf10d975c54">AI_MATKEY_MAPPING</a></code> material property in order to display all assets properly. </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a87577c60885b193571a10237341b237f"></a>aiProcess_TransformUVCoords</em>&nbsp;</td><td>
<hr/>
This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.</p>
<p>UV transformations are specified per-texture - see the <code><a class="el" href="material_8h.html#ab24f58c983cf26acc9389ed2530316a9">AI_MATKEY_UVTRANSFORM</a></code> material key for more information. This step processes all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most applications won't support UV transformations, so you will probably want to specify this step.</p>
<dl class="section note"><dt>Note:</dt><dd>UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix. </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a4982e6ac69991617b1481bce00d1fc0e"></a>aiProcess_FindInstances</em>&nbsp;</td><td>
<hr/>
This step searches for duplicate meshes and replaces them with references to the first mesh.</p>
<p>This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a> does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently <em>not</em> joined, although this is planned for future versions. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410af5fe0d6ee720c91359dc61cb849f2ebf"></a>aiProcess_OptimizeMeshes</em>&nbsp;</td><td>
<hr/>
A postprocessing step to reduce the number of meshes. </p>
<pre class="fragment">        This will, in fact, reduce the number of draw calls.

        This is a very effective optimization and is recommended to be used
        together with #aiProcess_OptimizeGraph, if possible. The flag is fully
        compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a3bf6b8cb30289fd27fb2734d67a0889f"></a>aiProcess_OptimizeGraph</em>&nbsp;</td><td>
<hr/>
A postprocessing step to optimize the scene hierarchy. </p>
<pre class="fragment">        Nodes without animations, bones, lights or cameras assigned are 
        collapsed and joined.

        Node names can be lost during this step. If you use special 'tag nodes'
        to pass additional information through your content pipeline, use the
        &lt;tt&gt;#AI_CONFIG_PP_OG_EXCLUDE_LIST&lt;/tt&gt; setting to specify a list of node 
        names you want to be kept. Nodes matching one of the names in this list won't
        be touched or modified.

        Use this flag with caution. Most simple files will be collapsed to a 
        single node, so complex hierarchies are usually completely lost. This is not
        useful for editor environments, but probably a very effective
        optimization if you just want to get the model data, convert it to your
        own format, and render it as fast as possible. 

        This flag is designed to be used with #aiProcess_OptimizeMeshes for best
        results.

        @note 'Crappy' scenes with thousands of extremely small meshes packed
        in deeply nested nodes exist for almost all file formats.
        #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph 
        usually fixes them all and makes them renderable. </pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a06922b6a1f1cd8186f9fdafb471c813e"></a>aiProcess_FlipUVs</em>&nbsp;</td><td>
<hr/>
This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.</p>
<p><b>Output UV coordinate system:</b> </p>
<div class="fragment"><div class="line">           0y|0y ---------- 1x|0y </div>
<div class="line">       |                 |</div>
<div class="line">       |                 |</div>
<div class="line">       |                 |</div>
<div class="line">       0x|1y ---------- 1x|1y</div>
</div><!-- fragment --><p>You'll probably want to consider this flag if you use Direct3D for rendering. The <a class="el" href="postprocess_8h.html#acd2361a766665ce2dbfb3eae201b784d" title="Shortcut flag for Direct3D-based applications.">aiProcess_ConvertToLeftHanded</a> flag supersedes this setting and bundles all conversions typically required for D3D-based applications. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a429a11bf7ace46f039f55de895505d4a"></a>aiProcess_FlipWindingOrder</em>&nbsp;</td><td>
<hr/>
This step adjusts the output face winding order to be CW. </p>
<pre class="fragment">       The default face winding order is counter clockwise (CCW).

       &lt;b&gt;Output face order:&lt;/b&gt;
       @code 
             x2

                               x0
        x1
       @endcode</pre> </td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410ac662c1d8f4e37cdf2a54023b174da192"></a>aiProcess_SplitByBoneCount</em>&nbsp;</td><td>
<hr/>
This step splits meshes with many bones into sub-meshes so that each su-bmesh has fewer or as many bones as a given limit. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a64795260b95f5a4b3f3dc1be4f52e410a8e14bca58301e2ee29cf928156c3a9f9"></a>aiProcess_Debone</em>&nbsp;</td><td>
<hr/>
This step removes bones losslessly or according to some threshold. </p>
<pre class="fragment">        In some cases (i.e. formats that require it) exporters are forced to
        assign dummy bone weights to otherwise static meshes assigned to
        animated meshes. Full, weight-based skinning is expensive while
        animating nodes is extremely cheap, so this step is offered to clean up
        the data in that regard. 

        Use &lt;tt&gt;#AI_CONFIG_PP_DB_THRESHOLD&lt;/tt&gt; to control this. 
        Use &lt;tt&gt;#AI_CONFIG_PP_DB_ALL_OR_NONE&lt;/tt&gt; if you want bones removed if and 
            only if all bones within the scene qualify for removal.</pre> </td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 10 2012 17:55:53 for Assimp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
